package com.luomo.java.juc.lock;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

/**
 * 可重入锁（递归锁）
 *
 * 公平锁/非公平锁
 *
 * @author LiuMei
 * @date 2021-04-09.
 */
public class ReentrantLockDemo {

    public static void main(String[] args) {
        Lock lock = new ReentrantLock();//非公平
        Lock lock2 = new ReentrantLock(true);//公平
    }

}
